import java.util.ArrayList;
import java.util.List;

public class Hall {
    private String id;
    private String name;
    private int rows;
    private int cols;
    private List<Seat> seats;

    public Hall(String id, String name, int rows, int cols) {
        this.id = id;
        this.name = name;
        this.rows = rows;
        this.cols = cols;
        this.seats = new ArrayList<>();
        for (int i = 1; i <= rows; i++) {
            for (int j = 1; j <= cols; j++) {
                seats.add(new Seat(i + "-" + j, i, j));
            }
        }
    }

    // Getters
    public String getId() { return id; }
    public String getName() { return name; }
    public int getRows() { return rows; }
    public int getCols() { return cols; }
    public List<Seat> getSeats() { return seats; }

    public int getAvailableSeats() {
        return (int) seats.stream().filter(s -> !s.isSold()).count();
    }
}